import request from '@/utils/request'

// 查询水表档案列表
export function listWaterData(query) {
  return request({
    url: '/meterread/monthusage/list',
    method: 'get',
    params: query
  })
}

// 查询月用水量汇总列表
export function listMonthusage(query) {
  return request({
    url: '/meterread/monthusage/hisList',
    method: 'get',
    params: query
  })
}

// 查询月用水量汇总列表
export function listMonthusageImg(query) {
  return request({
    url: '/meterread/monthusage/hisList',
    method: 'get',
    params: query
  })
}

// 查询月用水量汇总详细
export function getMonthusage(id) {
  return request({
    url: '/meterread/monthusage/' + id,
    method: 'get'
  })
}

// 根据水费账单查询月用水量汇总统计
export function getMonthStatistics() {
  return request({
    url: '/revenue/bill/monthStatistics',
    method: 'get'
  })
}

// 新增月用水量汇总
export function addMonthusage(data) {
  return request({
    url: '/meterread/monthusage',
    method: 'post',
    data: data
  })
}

// 修改月用水量汇总
export function updateMonthusage(data) {
  return request({
    url: '/meterread/monthusage',
    method: 'put',
    data: data
  })
}

// 删除月用水量汇总
export function delMonthusage(id) {
  return request({
    url: '/meterread/monthusage/' + id,
    method: 'delete'
  })
}
